package Scnen3;

import Picture.GameImage;

import java.awt.image.BufferedImage;
import java.util.ArrayList;

public class J {
    int x = 800;
    int y = 1000;
    int index = 0;
    BufferedImage img ;
    ArrayList<BufferedImage> arrayList= new ArrayList<>();
    public J(){
        for (int i = 1; i <= 7; i++) {
            arrayList.add(GameImage.get("/Picture/Scene3/j"+i+".png"));
        }
    }
    public void changeImage(){
        if(index == 6){
            index  = 0;
        }
        img = arrayList.get(index);
        index++;
    }
}
